<center>
<div id="addContent" style="width:97%;"></div>

<div style="clear:both;height:10px;">&nbsp;</div>
<fieldset style="width:90%">
    <legend><?php _resource('list '.$this->params['controller']);?></legend>
    <div>
    <div class="button"><a onclick="ajax('addContent','<?php echo $this->params['controller']?>/add');" href="javascript:;" title="<?php _resource('add');?>"  > <span class="icon-32-new"> </span></a></div>
    <div class="button"><a onclick="ajaxSubmit('listContent','<?php echo $this->params['controller']?>/published/0/1','multi_noneConfirm','listForm',true);" href="javascript:;" title="<?php _resource('publish');?>"  > <span class="icon-32-publish"> </span></a></div>
    <div class="button"><a onclick="ajaxSubmit('listContent','<?php echo $this->params['controller']?>/published/0/0','multi_noneConfirm','listForm',true);" href="javascript:;" title="<?php _resource('unpublish');?>"  > <span class="icon-32-unpublish"> </span></a></div>
    <div class="button"><a onclick="ajaxSubmit('listContent','<?php echo $this->params['controller']?>/delete','multi','listForm',true);" href="javascript:;" title="<?php _resource('delete');?>"  > <span class="icon-32-trash"> </span></a></div>
    <div style="float:right">
      <form action="#" method="post" name="filterForm" id="filterForm">
        <table width="100%">
        <?php if(count($filterField)>0){?>
          <tr>
            <td align="left">             
              <input name="filter_text" size="10" value="<?php echo $this->Session->read($uses[0].'2'.'.filterText') ?>" />
              &nbsp;&nbsp;&nbsp;&nbsp;<?php _resource('filter by') ?>:&nbsp;&nbsp;&nbsp;&nbsp;
              <select name="filter_field" id="filter_state" class="inputbox" size="1" >
                <?php 
					foreach($filterField as $k=>$v){
						$select="";
						
						if($k==$this->Session->read($uses[0].'2'.'.filterField')){							
							$select='selected="selected"';
						}
						echo '<option value="'.$k.'" '.$select.'>'.$v.'</option>';
					}?>
              </select>
              &nbsp;&nbsp;&nbsp;&nbsp;
              <input type="button" value="<?php _resource('search') ?>" onclick="ajax('listContent','<?php echo $this->params['controller'].'/filter';?>','filterForm');">
            </td>
          </tr>
          <?php }?>
        </table>
      </form>
    </div>
    <div class="clear"></div>         
    </div> 
       
    <div id="listContent">
    	<script>
    		ajax('listContent','<?php echo $this->params['controller']?>/lists');
    	</script>
    </div>    
</fieldset>

</center>
